package oa.struts.action;

import java.util.Collection;

import javax.annotation.Resource;

import oa.domain.MenuItem.MenuItem;
import oa.service.MenuItemService;
import oa.struts.action.base.BaseAction;

import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionContext;

@Controller("menuItemAction")
public class MenuItemAction  extends BaseAction<MenuItem>{

	@Resource(name="menuItemService")
	private MenuItemService menuItemService;
	
	public String showAllMenuItem(){
		Collection<MenuItem> menuItemList = this.menuItemService.getAllMenuitem();
	    System.out.println(menuItemList);
		ActionContext.getContext().getValueStack().push(menuItemList);
	    return SUCCESS;
	 }
	
	
}
